Release 10.1A: OpenEdge Development:
.NET Open Clients
Sharing of the connection pool between session-free AppObjects
A session-free AppObject is instantiated using an explicitly provided
Connectionobject. TheConnectionobject instance establishes a reference to the AppObject’s connection pool. If the sameConnectionobject instance is then used to instantiate other session-free AppObject instances, the subsequent AppObject instances will share the connection pool referenced by theConnectionobject. SubAppObjects and ProcObjects always share the connection pool of their associated AppObject.The
Connectionobject’s reference to the connection pool will be maintained until theReleaseConnection()method is called on theConnectionobject. This reference might affect the life cycle of the connection pool. That is, theConnectionobject may be used to sustain the existence of the connection pool beyond the lifetime of the AppObject (and its associated SubAppObjects and ProcObjects). It is your responsibility to callReleaseConnection()on theConnectionobject to remove the reference to the connection pool.Note that a single
Connectionobject can be used to instantiate instances of different AppObject classes, provided that theConnectionobject refers to an AppServer that provides the necessary application services. This is possible since a single AppServer can serve multiple application services. However, no validation of this is provided.The
Connectionobject does not maintain a reference to a session-managed AppObject, regardless of how it is constructed. If a session-managed AppObject is constructed using aConnectionobject that contains a reference to a connection pool, an exception is thrown. In other words,Connectionobjects cannot be shared between session-free and session-managed AppObjects.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |